<template>
<h3>parent</h3>
<child title="传递数据" :age="age" @send="get"/>
<p>{{ msg }}</p>
</template>

<script setup>
import child from './child.vue'
import {ref} from 'vue'

const msg=ref("")
function get(data){
 msg.value=data
}

const age=ref(20)
</script>